# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: Orhun Parmaksız <orhun@archlinux.org>
# Maintainer: T.J. Townsend <blakkheim@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=scrot
pkgver=1.10
pkgrel=1
pkgdesc='Simple command-line screenshot utility for X'
url='https://github.com/resurrecting-open-source-projects/scrot'
arch=('loong64' 'x86_64')
license=('MIT')
depends=('imlib2' 'libxext' 'libxinerama' 'libxfixes' 'libxcomposite' 'libbsd')
makedepends=('autoconf-archive')
source=("${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha512sums=('583af4369c8ce0be3d7aff60c65f36c800e562dc9117aec90b3d7094f5aba0b75ef27e00c2990d9a6f88e02a6dee54835856848c173995299ccca6d92bfe4894')
b2sums=('b372d1c9ce5ea930f68a11b0d1001110f33667653725fbad17b74a71e823394e909dd5873e36ab58504ebe4fab48422bb291415541e5a2bf59605ac216d77162')

prepare(){
  cd ${pkgname}-${pkgver}
  autoreconf -fiv
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure \
    --prefix=/usr \
    --mandir=/usr/share/man
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm644 README.md ChangeLog -t "${pkgdir}"/usr/share/doc/${pkgname}
  install -Dm644 COPYING -t "${pkgdir}"/usr/share/licenses/${pkgname}
}

# vim: ts=2 sw=2 et:
